﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Gurucore.Framework.DataAccess.Persistence.QueryLanguage
{
	public sealed class Aggregation : Operand
	{
		public static Aggregation SUM = new Aggregation("SUM");
		public static Aggregation COUNT = new Aggregation("COUNT");
		public static Aggregation COUNT_DISTINCT = new Aggregation("COUNT", "DISTINCT");
		public static Aggregation MAX = new Aggregation("MAX");
		public static Aggregation MIN = new Aggregation("MIN");
		public static Aggregation AVG = new Aggregation("AVG");

		private string m_sIdentifier;
		private string m_sOption;

		private Aggregation(string p_sIdentify, string p_sOption)
		{
			m_sIdentifier = p_sIdentify;
			m_sOption = p_sOption;
		}

		private Aggregation(string p_sIdentify)
		{
			m_sIdentifier = p_sIdentify;
			m_sOption = string.Empty;
		}

		public string Identifier
		{
			get
			{
				return m_sIdentifier;
			}
		}

		public string Option
		{
			get
			{
				return m_sOption;
			}
		}

		public override string ToExpressionString(IExpressionMaker p_expressionMaker)
		{
			throw new NotImplementedException();
		}
	}
}
